<?php
/** @var $this yii\web\View  */
use frontend\models\ddAddress;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

$this->registerJsFile('@web/jsaddress/jsAddress.js');
$this->registerCssFile('/style/address.css');
$this->registerCssFile('/style/home.css');

?>


<div style="clear:both;"></div>

<!-- 页面主体 start -->
<div class="main w1210 bc mt10">
    <div class="crumb w1210">
        <h2><strong>我的XX </strong><span>> 我的订单</span></h2>
    </div>

    <!-- 左侧导航菜单 start -->
    <div class="menu fl">
        <h3>我的XX</h3>
        <div class="menu_wrap">
            <dl>
                <dt>订单中心 <b></b></dt>
                <dd><b>.</b><a href="">我的订单</a></dd>
                <dd><b>.</b><a href="">我的关注</a></dd>
                <dd><b>.</b><a href="">浏览历史</a></dd>
                <dd><b>.</b><a href="">我的团购</a></dd>
            </dl>

            <dl>
                <dt>账户中心 <b></b></dt>
                <dd class="cur"><b>.</b><a href="">账户信息</a></dd>
                <dd><b>.</b><a href="">账户余额</a></dd>
                <dd><b>.</b><a href="">消费记录</a></dd>
                <dd><b>.</b><a href="">我的积分</a></dd>
                <dd><b>.</b><a href="">收货地址</a></dd>
            </dl>

            <dl>
                <dt>订单中心 <b></b></dt>
                <dd><b>.</b><a href="">返修/退换货</a></dd>
                <dd><b>.</b><a href="">取消订单记录</a></dd>
                <dd><b>.</b><a href="">我的投诉</a></dd>
            </dl>
        </div>
    </div>
    <!-- 左侧导航菜单 end -->



    <!-- 右侧内容区域 start -->
    <div class="content fl ml10">
        <?php if(Yii::$app->requestedRoute=='address/list'):?>
        <div class="address_hd">
            <h3>收货地址薄</h3>
            <?php foreach($models as $key=>$model):?>
                <dl>
                    <dt>
                        <?=($key+1).'.'.$model->username?>
                        <?=$model->province_name?>
                        <?=$model->city_name?>
                        <?=$model->area_name?>
                        <?=$model->detail_address?>
                        <?=$model->mobilephone?>
                        <?=$model->status?"(默认地址)":"";?>
                    </dt>
                    <dd>
                        <?=Html::a('修改',['address/edit','id'=>$model->id])?>
                        <?=Html::a('删除',['address/del','id'=>$model->id])?>
                        <?=Html::a('设为默认地址',['address/set-default','id'=>$model->id])?>
                    </dd>
                </dl>
            <?php endforeach;?>
        </div>
        <?php endif;?>
        <?php /** @var $address \frontend\models\Address */?>
        <?php echo $this->render('edit',['address'=>$address])?>

    </div>
<!-- 右侧内容区域 end -->
</div>
<!-- 页面主体 end-->


<div style="clear:both;"></div>



